'''
Created on 2011-3-31

@author: Chine
'''
from django.contrib.sitemaps import Sitemap
from models import Article

class ArticleSitemap(Sitemap):
    changefrep = "daily"
    priority = 0.5
    
    def items(self):
        return Article.objects.filter(status=2)
    
    def lastmod(self, obj):
        return obj.modified